/*
 * @Autor: zengy
 * @Date: 2021-03-31 15:58:40
 * @LastEditors: zengy
 * @LastEditTime: 2021-10-15 10:22:31
 * @Description:
 * @FilePath: \m_t\src\router\index.js
 */
import { createRouter, createWebHashHistory } from 'vue-router';

import axios from '@p/axios';
import api from '@/api/interface';
import store from '@/store';

// 路由信息
const routes = [
  {
    path: '/',
    redirect: '/index'
  },
  {
    // 导航页面
    path: '/index',
    name: 'index',
    component: () => import('@v/index.vue')
  },
  {
    // 导航页面
    path: '/index',
    name: 'index',
    component: () => import('@v/index.vue')
  },
  {
    // 测试页面
    path: '/test',
    name: 'test',
    meta:{
      name:'测试'
    },
    component: () => import('@v/demo/index.vue')
  },
  {
    path: '/:catchAll(.*)',
    redirect: { name: 'index' }
  }
];

// 导出路由
const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
